import 'package:flutter/material.dart';

class Showdialog {
  static show(context,
      {String title, Widget content, List<Widget> actions, double circular}) {
    return showDialog(
        context: context,
        builder: (BuildContext context) {
          return AlertDialog(
            title: Container(
              child: Stack(
                alignment: Alignment.center,
                children: [
                  Center(child: Text(title)),
                  Positioned(
                    right: 0,
                    top: 0,
                    child: Icon(
                      Icons.close,
                      size: 30,
                      color: Color.fromRGBO(153, 153, 153, 1),
                    ),
                  )
                ],
              ),
              width: MediaQuery.of(context).size.width,
              alignment: Alignment.center,
              padding: EdgeInsets.only(bottom: 10),
              decoration: BoxDecoration(
                  border: Border(
                      bottom: BorderSide(
                          color: Color.fromRGBO(238, 238, 238, 1),
                          width: 0.5))),
            ),
            shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(circular)),
            backgroundColor: Colors.white,
            content: content,
            actions: actions,
          );
        });
  }
}
